


<!DOCTYPE html>
<html id="htmlId">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
  <title>Coverage Report > EbusinessvueApplication</title>
  <style type="text/css">
    @import "../../css/coverage.css";
    @import "../../css/idea.min.css";
  </style>
  <script type="text/javascript" src="../../js/highlight.min.js"></script>
  <script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
</head>

<body>
<div class="content">
<div class="breadCrumbs">
Current scope:     <a href="../../index.html">all classes</a>
    <span class="separator">|</span>
    <a href="../index.html">com.ie</a>
</div>

<h1>Coverage Summary for Class: EbusinessvueApplication (com.ie)</h1>

<table class="coverageStats">

<tr>
  <th class="name">Class</th>
<th class="coverageStat 
">
  Method, %
</th>
<th class="coverageStat 
">
  Line, %
</th>
</tr>
<tr>
  <td class="name">EbusinessvueApplication</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (4/4)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (11/11)
  </span>
</td>
</tr>
  <tr>
    <td class="name">EbusinessvueApplication$$SpringCGLIB$$0</td>
  </tr>
  <tr>
    <td class="name">EbusinessvueApplication$$SpringCGLIB$$FastClass$$0</td>
  </tr>
  <tr>
    <td class="name">EbusinessvueApplication$$SpringCGLIB$$FastClass$$1</td>
  </tr>
<tr>
  <td class="name"><strong>Total</strong></td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (4/4)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (11/11)
  </span>
</td>
</tr>
</table>

<br/>
<br/>


<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package com.ie;
&nbsp;
&nbsp;import org.mybatis.spring.annotation.MapperScan;
&nbsp;import org.springframework.boot.SpringApplication;
&nbsp;import org.springframework.boot.autoconfigure.SpringBootApplication;
&nbsp;import org.springframework.context.annotation.Bean;
&nbsp;import org.springframework.web.cors.CorsConfiguration;
&nbsp;import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
&nbsp;import org.springframework.web.filter.CorsFilter;
&nbsp;
&nbsp;@SpringBootApplication
&nbsp;@MapperScan(&quot;com.ie.mapper&quot;)
<b class="fc">&nbsp;public class EbusinessvueApplication {</b>
&nbsp;
&nbsp;	public static void main(String[] args) {
<b class="fc">&nbsp;		SpringApplication.run(EbusinessvueApplication.class, args);</b>
&nbsp;	}
&nbsp;
&nbsp;	/*
&nbsp;    https://blog.csdn.net/qq_43521551/article/details/120574594 spring-boot跨域请求访问配置方式总结
&nbsp;    https://blog.csdn.net/m0_71777195/article/details/126830773 SpringBoot 解决跨域问题的 5 种方案
&nbsp;    https://www.cnblogs.com/kenx/p/15201283.html SpringBoot 优雅配置跨域多种方式及Spring Security跨域访问配置的坑
&nbsp;    https://blog.csdn.net/qw_6918966011/article/details/132247158 SpringBoot 配置CORS处理前后端分离跨域配置无效问题解析
&nbsp;    https://blog.csdn.net/gzt19881123/article/details/128914552
&nbsp;   */
&nbsp;	private CorsConfiguration corsConfig() {
<b class="fc">&nbsp;		CorsConfiguration corsConfiguration = new CorsConfiguration();</b>
&nbsp;		// 允许跨域请求的域名
<b class="fc">&nbsp;		corsConfiguration.addAllowedOrigin(&quot;*&quot;);</b>
&nbsp;		// 允许发送的内容类型
<b class="fc">&nbsp;		corsConfiguration.addAllowedHeader(&quot;*&quot;);</b>
&nbsp;		// 跨域请求允许的请求方式
<b class="fc">&nbsp;		corsConfiguration.addAllowedMethod(&quot;*&quot;);</b>
&nbsp;        /*服务器端通过在响应 header 中设置 Access-Control-Allow-Credentials = true 来运行客户端携带证书式访问。
&nbsp;         通过对 Credentials 参数的设置，就可以保持跨域Ajax时的Cookie。这里需要注意的是：
&nbsp;         服务器端 Access-Control-Allow-Credentials = true时，参数Access-Control-Allow-Origin 的值不能为 &#39;*&#39; 。*/
&nbsp;		// corsConfiguration.setAllowCredentials(true);
&nbsp;         /*浏览器的同源策略，就是出于安全考虑，浏览器会限制从脚本发起的跨域HTTP请求
&nbsp;        （比如异步请求GET, POST, PUT, DELETE, OPTIONS等等），所以浏览器会向所请求的服务器发起两次请求，
&nbsp;        第一次是浏览器使用OPTIONS方法发起一个预检请求，第二次才是真正的异步请求，
&nbsp;        第一次的预检请求获知服务器是否允许该跨域请求：如果允许，才发起第二次真实的请求；如果不允许，
&nbsp;        则拦截第二次请求。Access-Control-Max-Age用来指定本次预检请求的有效期，单位为秒，，
&nbsp;        在此期间不用发出另一条预检请求。例如：response.addHeader(&quot;Access-Control-Max-Age&quot;, &quot;0&quot;)，
&nbsp;        表示每次异步请求都发起预检请求，也就是说，发送两次请求。 response.addHeader(&quot;Access-Control-Max-Age&quot;, &quot;1800&quot;)，
&nbsp;        表示隔30分钟才发起预检请求。也就是说，发送两次请求*/
<b class="fc">&nbsp;		corsConfiguration.setMaxAge(3600L);</b>
<b class="fc">&nbsp;		return corsConfiguration;</b>
&nbsp;	}
&nbsp;
&nbsp;	@Bean
&nbsp;	public CorsFilter corsFilter() {
<b class="fc">&nbsp;		UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();</b>
<b class="fc">&nbsp;		source.registerCorsConfiguration(&quot;/**&quot;, corsConfig());</b>
<b class="fc">&nbsp;		return new CorsFilter(source);</b>
&nbsp;	}
&nbsp;
&nbsp;}
</code>
</pre>
</div>

<script type="text/javascript">
(function() {
    var msie = false, msie9 = false;
    /*@cc_on
      msie = true;
      @if (@_jscript_version >= 9)
        msie9 = true;
      @end
    @*/

    if (!msie || msie && msie9) {
      hljs.highlightAll()
      hljs.initLineNumbersOnLoad();
    }
})();
</script>

<div class="footer">
    
    <div style="float:right;">generated on 2025-06-15 18:23</div>
</div>
</body>
</html>
